<#include "include/macro-head.ftl">
<#include "include/macro-script.ftl">
<!doctype html>
<html lang="en">
<head>
<@head></@head>
    <link href="${server}/css/editormd.css" rel="stylesheet">
    <title>haha-上传作品</title>
</head>
<body>
<#include "include/main-nav.ftl">
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="upload-article">
                <div class="upload-article-head">
                    <span class="glyphicon glyphicon-list"></span>&nbsp;发布作品/文章
                </div>
                <div class="upload-article-content">
                    <label>标题</label>
                    <input type="text" id="title" class="form-control" placeholder="标题">
                    <label>内容</label>
                    <div class="codeMirror-area">
                        <div id="editormd">
                            <textarea style="display:none;" id="content">## 作品内容</textarea>
                        </div>
                    </div>
                    <label>标签</label>
                    <div class="tags-input">
                        <div id="tags"></div>
                        <input type="text" id="tag" placeholder="添加标签,逗号分隔,最多四个">
                    </div>
                    <button class="btn btn-gary submit-work">发布</button>
                </div>
            </div>
        </div>
    </div>
</div>
<#include "include/main-footer.ftl">
</body>
<@script>
<script src="${server}/js/editormd.min.js"></script>
<script>addServer("${server}")</script>
<script>
    $(function () {
        var editor = editormd("editormd", {
            height: 600,
            emoji: true,
            path: "${server}/codeMirror/lib/" // Autoload modules mode, codemirror, marked... dependents libs path

        });
    });
</script>
</@script>
</html>